package com.adp.interceptor;

import com.adf.config.component.application.report.ReportBean;
import com.adf.system.ReportRequest;
import com.adf.system.component.application.report.configbean.editablereport.AbsEditableReportEditDataBean;
import com.adf.system.intercept.AbsInterceptorDefaultAdapter;

import java.util.Map;

/**
 * 业务对象拦截器
 * 禁用系统默认的提示信息
 * @author xjh
 *
 */
public class disableAutoSuccessPrompt extends AbsInterceptorDefaultAdapter {

	@Override
	public int doSavePerRow(ReportRequest rrequest, ReportBean rbean,
                            Map<String, String> mRowData, Map<String, String> mParamValues,
                            AbsEditableReportEditDataBean editbean) {
		
		int flag = super.doSavePerRow(rrequest,rbean,mRowData,mParamValues,editbean);
		//String rtn =(String)mParamValues.get("rtn");//获取返回值
		//System.out.println("rtn1======="+rtn);

		rrequest.disableAutoSuccessPrompt();//关闭默认提示
		//rrequest.getWResponse().getMessageCollector().success(rtn,"{time:5}",false);//自定义提示窗口，5秒关闭
		//rrequest.getWResponse().getMessageCollector().alert("重复",false); 
		//rrequest.getWResponse().getMessageCollector().warn("重复",true);
		
		return flag;
	}
	
}